﻿//using System.Reflection;
//using Microsoft.Practices.Unity;
//using Microsoft.VisualStudio.TestTools.UnitTesting;

//namespace TestByWire.Test
//{
//    [TestClass]
//    public class TestByWireFixtureAttributeTest
//    {
//        private TestByWireAttribute _testByWireAttribute;

//        [TestInitialize]
//        public void PerTestSetup()
//        {
//            _testByWireAttribute = new TestByWireAttribute();
//        }

//        [TestMethod]
//        public void GetExecutionMustRegisterPipelineSettingsOnContainer()
//        {
//            var extensionExecution = _testByWireAttribute.GetExecution();

//            var containerField = extensionExecution.GetType().GetField("_container", BindingFlags.Instance | BindingFlags.NonPublic);
//            var container = (IUnityContainer)containerField.GetValue(extensionExecution);

//            Assert.IsNotNull(container.Resolve<PipelineSettings>());
//        }

//        [TestMethod]
//        public void GetExecutionMustResetTargetInvoker()
//        {
//            _testByWireAttribute.GetExecution();

//            var containerField = typeof(TargetInvoker).GetField("Container", BindingFlags.Static | BindingFlags.NonPublic);
//            Assert.IsNotNull(containerField.GetValue(null));
//        }

//        [TestMethod]
//        public void GetExecutionMustResetRecorderContainer()
//        {
//            _testByWireAttribute.GetExecution();

//            var containerField = typeof(Recorder).GetField("_container", BindingFlags.Static | BindingFlags.NonPublic);
//            Assert.IsNotNull(containerField.GetValue(null));
//        }

//        [TestMethod]
//        public void GetExecutionMustResetThenContainer()
//        {
//            _testByWireAttribute.GetExecution();

//            var containerField = typeof(Then).GetField("Container", BindingFlags.Static | BindingFlags.NonPublic);
//            Assert.IsNotNull(containerField.GetValue(null));
//        }
//    }
//}
